﻿#Region "Using Directives"
Imports System
Imports System.Collections.Generic
Imports System.Text
#End Region

Namespace C4F.DevKit.Bluetooth
    Namespace ServiceAndDeviceDiscovery


        ''' <summary>
        ''' Represents the QuerySet structure used in call to 
        ''' WSALookUp* functions.
        ''' </summary>
        <System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices. _
                                                     LayoutKind.Sequential, _
                                                     CharSet:=System.Runtime. _
                                                     InteropServices.CharSet.Auto)> _
        Public Class QuerySet

            ''' <summary>
            ''' Must be set to sizeof(WSAQuerySet).
            ''' </summary>
            Public Size As Integer

            ''' <summary>
            ''' Referenced string contains service name. 
            ''' </summary>
            Public ServiceInstanceName As String

            ''' <summary>
            ''' GUID corresponding to the service class.
            ''' </summary>
            Public ServiceClassId As IntPtr

            ''' <summary>
            ''' References desired version number and provides version 
            ''' comparison semantics(that is, version must match exactly, 
            ''' or version must be not less than the value supplied).
            ''' </summary>
            Public Version As IntPtr

            ''' <summary>
            ''' Ignored for queries.
            ''' </summary>
            Public Comment As String

            ''' <summary>
            ''' Identifier of a single namespace in which to constrain
            ''' the search, or NS_ALL to include all namespaces.
            ''' </summary>
            Public [NameSpace] As Integer

            ''' <summary>
            ''' References the GUID of a specific name-space provider,
            ''' and limits the query to this provider only.
            ''' </summary>
            Public NsProviderId As IntPtr

            ''' <summary>
            ''' Specifies the starting point of the query in a hierarchical 
            ''' namespace.
            ''' </summary>
            Public Context As String

            ''' <summary>
            ''' Size of the protocol constraint array, in bytes. Can be zero.
            ''' </summary>
            Public NumberOfProtocols As Integer

            ''' <summary>
            ''' References an array of AFPROTOCOLS structure.
            ''' </summary>
            Public Protocols As IntPtr

            ''' <summary>
            ''' Some namespaces (such as Whois++) support enriched SQL-like queries 
            ''' that are contained in a simple text string. This parameter is used 
            ''' to specify that string.
            ''' </summary>
            Public QueryString As String

            ''' <summary>
            ''' Ignored for queries.
            ''' </summary>
            Public NumberOfCsAddrs As Integer

            ''' <summary>
            ''' Ignored for queries.
            ''' </summary>
            Public Buffer As IntPtr

            ''' <summary>
            ''' Ignored for queries.
            ''' </summary>
            Public OutputFlags As Integer

            ''' <summary>
            ''' Pointer to a provider-specific entity.
            ''' </summary>
            Public Blob As IntPtr

        End Class
    End Namespace
End Namespace